From: Debian X Strike Force Date: Fri, 13 Feb 2026 08:18:12 +0000 (+0200) Subject: path_max X-Git-Tag: archive/raspbian/26.0.0-1+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4551e2382c77270c5ada613b887baada946a6eb1;p=mesa.git path_max Gbp-Pq: Name path_max.diff --- diff --git a/src/util/tests/cache_test.cpp b/src/util/tests/cache_test.cpp index 5779fba3c..f0efb94ae 100644 --- a/src/util/tests/cache_test.cpp +++ b/src/util/tests/cache_test.cpp @@ -89,8 +89,8 @@ check_directories_created(void *mem_ctx, const char *cache_dir) { bool sub_dirs_created = false; - char buf[PATH_MAX]; - if (getcwd(buf, PATH_MAX)) { + char *buf = getcwd(NULL, 0); + if (buf) { char *full_path = ralloc_asprintf(mem_ctx, "%s%s", buf, ++cache_dir); struct stat sb; if (stat(full_path, &sb) != -1 && S_ISDIR(sb.st_mode)) diff --git a/src/util/tests/process_test.c b/src/util/tests/process_test.c index fbbc7aff7..11e5286cb 100644 --- a/src/util/tests/process_test.c +++ b/src/util/tests/process_test.c @@ -37,6 +37,10 @@ #define PATH_MAX MAX_PATH #endif +#if !defined(PATH_MAX) && defined(__GNU__) +#define PATH_MAX (4096) +#endif + static bool error = false; static void